home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / bootslow.zip / SOURCE.ZIP / MKTABLE.ASM < prev    next >
Assembly Source File  |  1991-08-06  |  2KB  |  92 lines

  1. ;
  2. ;; SlowDown for self-booting software
  3. ;;
  4. ;; BOOTSLOW
  5. ;;
  6. ;; Copyright 1991 Alexander R. Pruss
  7. ;;
  8. ;; May be freely distributed, modified and used provided that no copyright
  9. ;; messages are removed, and this sentence together with the next two are
  10. ;; always included in unmodified form.  If you like this program a lot, you are
  11. ;; invited to show your appreciation by making a tax-deductible donation to
  12. ;; the Pro-Life or Anti-Abortion movement, but are under no obligation, moral
  13. ;; or otherwise to do so (especially if you disagree with the goals of this
  14. ;; movement.)  There is no warranty; use at own risk.
  15. ;
  16.     include macros.inc
  17. c segment
  18.     org 100h
  19. BEGIN:
  20.     assume CS:c,DS:c
  21.     Puts copyright
  22.     Puts drive_q
  23. g:
  24.     DOSGetch
  25.     or al,TOLOWER
  26.     cmp al,'a'
  27.     jb g
  28.     cmp al,'z'
  29.     ja g
  30.     sub al,'a'
  31.     mov dl,al
  32.     Clear ax
  33.     push ds
  34.     pop es
  35.     Clear dh
  36.     push dx
  37.     mov bx,offset itable
  38.     mov ax,0202h
  39.     mov cx,0002h
  40.     int 13h
  41.     jc diskerror
  42.  
  43.     mov ah,CreatHandle
  44.     mov dx,offset filename
  45.     mov cx,ArchBit
  46.     int 21h
  47.     jc openerror
  48.     mov bx,ax
  49.     mov ah,WriteHandle
  50.     mov cx,1024
  51.     mov dx,offset itable
  52.     int 21h
  53.     pushf
  54.     mov ah,CloseHandle
  55.     int 21h
  56.     popf
  57.     jc openerror
  58.  
  59.     Puts done
  60.     mov ax,4c00h
  61.     int 21h
  62.  
  63. openerror:
  64.     Puts cantopen
  65.     mov ax,4c01h
  66.     int 21h
  67.  
  68. diskerror:
  69.     Puts i13error
  70.     mov ax,4c02h
  71.     int 21h
  72.  
  73. _puts proc near
  74. top:
  75.     mov bx,1
  76.     mov dx,si
  77.     mov ah,WriteHandle
  78.     int 21h
  79.     ret
  80. _puts endp
  81.  
  82. String copyright, <'Interrupt table recorder.', CR,LF, '(C) Copyright 1991 Alexander Pruss', CR,LF>
  83. String drive_q, <'Choose physical floppy drive to load data from: (A,B,etc.)', CR,LF>
  84. String cantopen, <'Error writing boot.itb.',CR,LF>
  85. String i13error, <'Low level disk error.',CR,LF>
  86. String done, <'Done!',CR,LF>
  87. filename db 'boot.itb',00
  88. itable:
  89.  
  90. c ends
  91. end BEGIN
  92.